package com.openway.game.view.impl;

import com.openway.game.Game;
import com.openway.game.personage.GameObject;
import com.openway.game.view.View;

/**
 * {@link View} implementation that display game state at console in text-based format
 *
 * @author Created: 29.02.12 13:44
 * @version $Date$ $Revision$
 */
public class ConsoleTextView implements View {

    @Override
    public void render() {
        for (GameObject[] row : Game.getInstance().getPlayingField().getFieldSnapshot()) {
            for (GameObject gameObject : row)
                if (gameObject != null)
                    System.out.println(gameObject);
        }
    }
}
